package fan.project1_SpeedTalkSystem.Model;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {
    static SimpleDateFormat dateFormat =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    public static String dateFormat(Date date){
        return dateFormat.format(date);
    }
    public static Date toDate(String date) throws ParseException {
        return dateFormat.parse(date);
    }
}
